/**
 * 
 */
package cc3002;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

/**
 * JUnit Test class : DeadlyRib
 * ----------------------------
 * Testing Deadly Ribs extending WeirdFood.
 * @author Anibal Llanos Prado
 *
 */
public class DeadlyRibTest extends WeirdFoodTest{

	/**
	 * Setup. Fixtures are inherited .
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception {
		food1=new DeadlyRib();
		food2=new DeadlyRib();
		bites=1;
	}

	/**
	 * Test method for {@link cc3002.DeadlyRib#bite(cc3002.HealthState)}.
	 */
	@Test
	public void testBite() {
		assertEquals(food1.bite(new HealthState()), 1000);
		assertEquals(food1.bite(new HealthState()), 0);
	}

	/**
	 * Test method for {@link cc3002.DeadlyRib#modifyHealth(cc3002.HealthState)}.
	 */
	@Test
	public void testModifyHealth() {
		HealthState health=new HealthState();
		food1.bite(health);
		assertEquals(health.getState(),1);
		new DeadlyRib().bite(health);
		assertEquals(health.getState(),0);
		new DeadlyRib().bite(health);
		assertEquals(health.getState(),0);
	}

	/**
	 * Test method for {@link cc3002.WeirdFood#setCalories(int)}.
	 */
	@Test
	public void testSetCalories() {
		super.testSetCalories();
	}

	/**
	 * Test method for {@link cc3002.Food#setName(java.lang.String)}.
	 */
	@Test
	public void testSetName() {
		super.testSetName();
	}

}
